Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sql/analyzer/prune_columns.go: Turn off pruneColumns when a Subquery expression exists. #314

Merged

Conversation

reltuk
Copy link
Contributor

@reltuk reltuk commented Feb 25, 2021

No description provided.

@reltuk reltuk requested a review from zachmu February 25, 2021 02:41
Copy link
Member

@zachmu zachmu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LG!

// We do not run pruneColumns if there is a Subquery
// expression, because the field rewrites and scope handling
// in here are not principled.
plan.Inspect(n, func(n sql.Node) bool {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

plan.InspectExpressions is what you want here

@reltuk reltuk changed the title sql/analyzer/prune_columns.go: Turn of pruneColumns when a Subquery expression exists. sql/analyzer/prune_columns.go: Turn off pruneColumns when a Subquery expression exists. Feb 25, 2021
@reltuk reltuk merged commit 5b877de into master Feb 25, 2021
@Hydrocharged Hydrocharged deleted the aaron/avoid-pruneColumns-with-subquery-expression-below-node branch February 26, 2021 01:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants